<?php
// define array
$arr = array (
  0 => 'one',
  1 => 'two',
  2 => 'three',
  3 => 'four',
);
// convert array to string
// output: 'one and two and three and four'
echo $str = implode(' and ', $arr);
echo "\n\n";
// define string
$str = 'tinker,tailor,soldier,spy';

// convert string to array
$arr = explode('r', $str);
print_r($arr);

/*
Array
(
    [0] => tinker
    [1] => tailor
    [2] => soldier
    [3] => spy
)
*/

